<template>
  <div class="persion">
    <p>姓名:{{ name }}</p>
    <p>年龄:{{ age }}</p>
    <button @click="changeName">修改名字</button>
    <button @click="changeAge">修改年龄</button>
    <button @click="showTel">查看联系方式</button>
  </div>
</template>

<script lang="ts">
export default {
  name: 'persion',
  data() {
    return {
      name: 'zhansan',
      age: 18,
      tel: '1333333333',
    }
  },
  methods: {
    showTel() {
      alert(this.tel)
    },
    changeName() {
      this.name = '张三'
    },
    changeAge() {
      this.age += 1
    },
  },
}
</script>

<style lang="scss"></style>
